<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <button>按钮</button>
    <script src="../../../../../../../万能初始化代码/AJax-axios/axios.js"></script>
    <script src="../../../../../../../万能初始化代码/js/jquery/jquery.js"></script>
    <script>
        $("button").on("click", function () {
            axios({
                method: "get",
                url: "http://www.liulongbin.top:3009/api/getbooks",
                params: {
                    id:"2"
                }
            }).then((restd) => {
                console.log(restd.data.data);
            }).catch((err)=>{
                alert('请求失败')
                console.log(err);
            });
        })
    </script>
</body>

</html>